﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Utility;

namespace Web
{
    public partial class SVSite : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

                QuanLyTrang();
            
        }

        private void QuanLyTrang()
        {
            if (Request.QueryString["page"] != null)
            {
                string page = Request.QueryString["page"].ToString();
                switch (page)
                {
                    case "thongbao":
                        lblTitle.Text = "Thông Báo";
                        WebHelper.LoadUserControl(Page, "sinhvien/UCTinTuc.ascx");
                        break;

                    case "lichhoc":
                        lblTitle.Text = "Lịch Học";
                        WebHelper.LoadUserControl(Page, "sinhvien/UCLichHoc.ascx");
                        break;
        

                    default:
                        Response.Redirect("sinhvienpage.aspx?page=thongbao");
                        break;
                }
            }
            else
            {
                Response.Redirect("sinhvienpage.aspx?page=thongbao");
            }
        }

    }
}